package com.micro.eduorder.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import org.springframework.beans.factory.annotation.Value;

/**
 * @Author Reyna.chen
 * @Date 2022/1/4 18:43
 * @Version 1.0
 * @Description:
 */

@RestController
@RefreshScope
@RequestMapping("config")
public class ConfigController {

    @Value(value="${message:123}")
    private String message;

    @RequestMapping(value="hello",method = GET)
    public String get(){
        return "hello,"+message;
    }
}
